package com.hirisun.calendar.filter;

import java.util.Date;

public class DurationVocationFilter implements IVocationFilter {
	
	private Date start = null;
	
	private Date end = null;
	
	private IVocationFilter filter;

	public IVocationFilter getFilter() {
		return filter;
	}

	public void setFilter(IVocationFilter filter) {
		this.filter = filter;
	}

	public Date getStart() {
		return start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	public Date getEnd() {
		return end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}
	
	

	public boolean isVocation(Date date) {
		if(date.after(start) && date.before(end)){
			return filter.isVocation(date);
		}		
		return false;
	}

}
